/**
 * Company
 * Copyright (C) 1992-2020 All Rights Reserved.
 */
package com.yinhai.mycat_test.mapper.write;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yinhai.mycat_test.entity.OrderItem;

/**
 * @author wanggan@yinhai.com
 * @version 1.0
 * @date 2020/4/9 15:19
 * @since JDK1.8
 */
public interface OrderItemWriteMapper {
    /**
     * 插入订单详细
     *
     * @param orderItem
     *
     * @return
     */
    int addOrderItem(OrderItem orderItem);
    
    /**
     * 批量新增订单详情
     *
     * @param itemList
     * @return
     */
    int addListOrderItem(List<OrderItem> itemList);
    
    /**
     * 根据订单id删除订单
     *
     * @param orderId
     * @return
     */
    int deleteOrderItemListByOrderId(Long orderId);
    
    /**
     * 通过订单id列表批量删除订单详情
     *
     * @param orderIds
     * @return
     */
    int deleteOrderItemListByOrderIds(List<Long> orderIds);
    
    /**
     * 清空订单详情
     */
    void truncateOrderDetail();
}
